package com.mall.bargain.mapper;

import com.mall.entity.bargain.BgUserBargain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户讨价还价映射器
 *
 * @author ASUS
 * @date 2021/07/21
 */
@Mapper
public interface UserBargainMapper {
    void insert(BgUserBargain userBargain);

    BgUserBargain findOne(Integer userBargainId);

    void update(BgUserBargain userBargain);

    List<BgUserBargain> findByUserIdAndBargainId(
            @Param("uid") Integer uid,
            @Param("id") Long id
    );

    BgUserBargain findOneByUserId(Integer userId);
}
